<template>
    <div>
        <van-card v-for="i in lblist"  :price="i.goods_price" @click="tzz(i.goods_id)"  :title="i.goods_name"
            :thumb="i.goods_big_logo" />
    </div>
</template>

<script setup>
import { ref } from 'vue';
import axios from 'axios';
import { useRouter } from 'vue-router';
import { useRoute } from 'vue-router';
const route=useRoute()
const router=useRouter()
const lblist=ref([])
axios.get('https://api-hmugo-web.itheima.net/api/public/v1/goods/search',{
    params:{
        cid:route.query.cid
    }
}).then((res)=>{
    lblist.value=res.data.message.goods
})
const tzz=(goods_id)=>{
    router.push({
        path:'/xq',
        query:{
            goods_id
        }
    })
}
</script>

<style></style>